//接口根路径
var wxUrl = 'http://456.sheyuan.com/sywapi';
var token = '';
var userToken = '';
var province = '北京';
var city = '北京';
var district = '东城区';
var longitude = 116.403963;
var latitude = 39.915119;
var app = 'http://456.sheyuan.com/sywwx';
//应用根路径
var self_base_path = 'http://456.sheyuan.com/sywwx';

//初始化
$(function () {
	var version = 201703011300;
    require.config({
        waitSeconds: 60,
        urlArgs: 'version=' + version,
        paths: {
            'goSwiper': app + '/libs/swiper/swiper.min',
            'loading': app + '/libs/components/loading',
            'wx-footer' : app + '/libs/components/footer'
        },
        shim: {
            'goSwiper':{
                exports: 'useSwiper'
            }
        },
    });
    //获取token
    getToken();
	getUserToken();
    //获取地理位置
    getLocation();
	// 自动登录
    //获取url中的id参数
	var params = getUrlParams();
	var auth = params.auth?params.auth:"";
	if(auth && userToken == ''){
		vLoginClick();
	}
    //开启fastclick 解决移动端300ms延迟
	var attachFastClick = Origami.fastclick;
    attachFastClick(document.body);
});